<script setup>
import router from '@/router/index'
import {ref,onMounted} from 'vue'



const isLogging=()=>{
  const token=localStorage.getItem('token')
  if(token){
    console.log('登录中')
    if(!token){
      return false
    }
    return true
  }
  return false
}

onMounted(()=>{
  console.log(isLogging())
  if(isLogging()){
    router.replace({ path: "/userManager" })
  }else{
    router.replace({ path: "/login" })
  }

 
  
})
</script>


<template>
  <div> <RouterView /></div>
 
</template>


<style scoped>

</style>
